package com.lanou.zy.projecta.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

/**
 * Created by dllo on 15/11/6.
 */
public class SrViewPagerAdapter extends FragmentPagerAdapter{
    private List<Fragment> srFragment;
    private List<String> titles;

    public SrViewPagerAdapter(FragmentManager fm, List<Fragment> srFragment, List<String> titles) {
        super(fm);
        this.srFragment = srFragment;
        this.titles = titles;
    }

    @Override
    public Fragment getItem(int position) {
        return srFragment.get(position);
    }

    @Override
    public int getCount() {
        return srFragment.size();
    }

    public CharSequence getPageTitle(int position) {
        return titles.get(position);
    }
}

